package com.ios.enums;
/**
*@Author:WenTao
*@Description:FM中间状态枚举类型
*@Date:11:11 2018/7/24
*/
public enum  FMStateEnum {

    SUCCESS_SHOW(10,"展示成功")
    ,FAIL_SHOW(00,"展示失败")
    ,SUCCESS_ADD(11,"添加FM成功")
    ,FAIL_ADD(01,"添加FM失败")
    ,PARAM(02,"参数不完整或参数为空");

    private int state;
    private String stateInfo;

    FMStateEnum(int state, String stateInfo) {
        this.state = state;
        this.stateInfo = stateInfo;
    }

    /*根据传入的state返回对应的enum值*/
    public static FMStateEnum stateof(int state){
        for (FMStateEnum stateEnum : values()){
            if (stateEnum.getState() == state){
                return stateEnum;
            }
        }
        return null;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }
}
